package com.qianclass.talklive.app.enter;

import android.content.Context;

import com.qianclass.talklive.app.view.IBaseView;

/**
 * Created by itgoyo on 17-6-14.
 */

public class IUserPlayRecordPresenterImpl implements IUerPlayRecordPresenter, OnPlayRecordListener,
                                                     OnGetRoomExIDListener
{

    private Context mComtext;
    private IBaseView mIBaseView;
    private PlayRecordModel mPlayRecordModel;

    public IUserPlayRecordPresenterImpl(Context mComtext, IBaseView mIBaseView ){
        this.mComtext = mComtext;
        this.mIBaseView = mIBaseView;
        mPlayRecordModel=new PlayRecordModelImpl();
    }

    @Override
    public void userPlayRecord( String roomid,String AgencyID) {
        mPlayRecordModel.userPlayRecord(roomid,AgencyID,this);
    }

    @Override
    public void getRoomID(String roomExID, String agentID) {
        mPlayRecordModel.getRecordRoomId(roomExID, agentID, this);
    }

    @Override
    public void showProgress() {

    }

    @Override
    public void hideProgress() {

    }

    @Override
    public void playRecordSuc(String url) {
        mIBaseView.playRecordSuc(url);
    }

    @Override
    public void playRecordFal() {
        mIBaseView.playRecordFal();
    }

    @Override
    public void onSuccess(String roomID) {
        mIBaseView.getRoomIDSuccess(roomID);
    }

    @Override
    public void onFailure(String error) {
        mIBaseView.getRoomIDFailure(error);
    }
}
